#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)

using namespace std;
#include<iostream>

//int main()
//{
//
//	int* ptr2 = new int(10);
//
//	int* ptr3 = new int[3] {1,2,3};
//
//	cout << *ptr2 << endl;
//	cout << ptr3[0] << endl;
//	cout << ptr3[1] << endl;
//	cout << ptr3[2] << endl;
//
//	delete ptr2;
//	delete[] ptr3;
//	return 0;
//}


class A
{
public:
	A(char a = '0')
		:_a(a)
	{
		cout << "A()" << this << endl;
	}
	~A()
	{
		cout << "~A()" << this << endl;
	}
	void Print()
	{
		cout << _a << endl;
	}

private:
	char _a;
};

int main()
{
	A* p1 = new A[10]{'a','b'};

	delete[] p1;
	return 0;
}